<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Ball Balancing Plate: C:/Users/Luca/Documents/Workspaces/Workspace/BallBalancing_ChibiOSRT/main.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.jpg"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Ball Balancing Plate
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
   <div id="projectbrief">ChibiOS-RT servos control firmware.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('main_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">C:/Users/Luca/Documents/Workspaces/Workspace/BallBalancing_ChibiOSRT/main.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Main servo control algorithms for Ball Balancing System.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;ch.h&quot;</code><br/>
<code>#include &quot;hal.h&quot;</code><br/>
<code>#include &quot;serial.h&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for main.c:</div>
<div class="dyncontent">
<div class="center"><img src="main_8c__incl.png" border="0" usemap="#_c_1_2_users_2_luca_2_documents_2_workspaces_2_workspace_2_ball_balancing___chibi_o_s_r_t_2main_8c" alt=""/></div>
</div>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#ga104df749bd51b5924bbfcd67313773c3">MIN_SERVO</a>&#160;&#160;&#160;700</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HS325HB servo min pulse.  <a href="group___ball_balancing.html#ga104df749bd51b5924bbfcd67313773c3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#ga6225ed2d3ed40a4841073e5b6b0b4166">MAX_SERVO</a>&#160;&#160;&#160;2400</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HS325HB servo max pulse.  <a href="group___ball_balancing.html#ga6225ed2d3ed40a4841073e5b6b0b4166"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#gaf3c82099d63a2d91d68bd62d954059c7">MAX_ANGLE</a>&#160;&#160;&#160;90</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HS325HB servo max absolute angle.  <a href="group___ball_balancing.html#gaf3c82099d63a2d91d68bd62d954059c7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#ga5de5e8e3ab304842347b047eb9a7a468">map</a>(in, inMin, inMax, outMin, outMax)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale an input value within a given range.  <a href="group___ball_balancing.html#ga5de5e8e3ab304842347b047eb9a7a468"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#gaf89aa0ee54dfbbdd58c7407aef33cd22">commandServo</a> (uint8_t servo, int8_t angle)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate a servo with the given angle.  <a href="group___ball_balancing.html#gaf89aa0ee54dfbbdd58c7407aef33cd22"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#gaf2c4109d8f7d0188c8bd1792b02368cb">WORKING_AREA</a> (ctrlThreadWA, 128)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The servo control thread.  <a href="group___ball_balancing.html#gaf2c4109d8f7d0188c8bd1792b02368cb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static msg_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#ga66c2c15e726cd90ad73f1497f6f9859c">CtrlThread</a> (void *arg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#ga840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application entry point.  <a href="group___ball_balancing.html#ga840291bc02cba5474a4cb46a9b9566fe"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static PWMConfig&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ball_balancing.html#ga902ad52cd507aae1615bd2858a47020d">pwmcfg</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">PWM configuration structure.  <a href="group___ball_balancing.html#ga902ad52cd507aae1615bd2858a47020d"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Main servo control algorithms for Ball Balancing System. </p>
</div></div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="main_8c.html">main.c</a>      </li>

    <li class="footer">Generated on Wed Jun 5 2013 12:23:45 for Ball Balancing Plate by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
